// 
// $Rev:: 13            $:  Revision of last commit
// $Author:: rvhaverm@g#$:  Author of last commit
// $Date:: 2010-07-25 1#$:  Date of last commit
// 
package agents.logging;

import agents.interfaces.ILogger;

public class ConsoleLogger implements ILogger
{

    @Override
    public void log(String text)
    {
	System.out.println(text);
    }

    @Override
    public void log(Exception e)
    {
	log("EXCEPTION: " + e.getMessage());
	log(e.getStackTrace());	
    }

    private void log(StackTraceElement[] stackTrace)
    {
	for (int i = 0; i < stackTrace.length; i++)
	{
	    log(stackTrace[i].toString());
	}
	
	
    }

}
